.class public Lcom/android/inputmethod/latin/LatinKeyboardView;
.super Lcom/android/inputmethod/latin/KeyboardView;
.source "LatinKeyboardView.java"


# static fields
.field static final DEBUG:Z = false

.field static final DEBUG_AUTO_PLAY:Z = false

.field static final INVALID_POINTER_ID:I = -0x1

.field static final KEYCODE_OPTIONS:I = -0x64

.field static final KEYCODE_SHIFT_LONGPRESS:I = -0x65

.field private static final MSG_TOUCH_DOWN:I = 0x1

.field private static final MSG_TOUCH_UP:I = 0x2

.field static final TAG:Ljava/lang/String; = "MTIP"


# instance fields
.field private isTempShift:Z

.field private mAsciiKeys:[Landroid/inputmethodservice/Keyboard$Key;

.field private mDownDelivered:Z

.field mDownPid:I

.field private mEnableMultiTouch:Z

.field mHandler2:Landroid/os/Handler;

.field private mHasShiftKey:Z

.field private mPhoneKeyboard:Landroid/inputmethodservice/Keyboard;

.field private mPlaying:Z

.field mShiftFreeze:Z

.field mShiftPid:I

.field private mStringIndex:I

.field private mStringToPlay:Ljava/lang/String;


# direct methods
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 2
    .parameter "context"
    .parameter "attrs"

    .prologue
    const/4 v1, 0x0

    const/4 v0, -0x1

    .line 54
    invoke-direct {p0, p1, p2}, Lcom/android/inputmethod/latin/KeyboardView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    .line 46
    iput v0, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mDownPid:I

    .line 47
    iput v0, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mShiftPid:I

    .line 48
    iput-boolean v1, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->isTempShift:Z

    .line 91
    const/16 v0, 0x100

    new-array v0, v0, [Landroid/inputmethodservice/Keyboard$Key;

    iput-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mAsciiKeys:[Landroid/inputmethodservice/Keyboard$Key;

    .line 94
    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mEnableMultiTouch:Z

    .line 252
    iput-boolean v1, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mShiftFreeze:Z

    .line 55
    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
    .locals 2
    .parameter "context"
    .parameter "attrs"
    .parameter "defStyle"

    .prologue
    const/4 v1, 0x0

    const/4 v0, -0x1

    .line 58
    invoke-direct {p0, p1, p2, p3}, Lcom/android/inputmethod/latin/KeyboardView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    .line 46
    iput v0, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mDownPid:I

    .line 47
    iput v0, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mShiftPid:I

    .line 48
    iput-boolean v1, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->isTempShift:Z

    .line 91
    const/16 v0, 0x100

    new-array v0, v0, [Landroid/inputmethodservice/Keyboard$Key;

    iput-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mAsciiKeys:[Landroid/inputmethodservice/Keyboard$Key;

    .line 94
    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mEnableMultiTouch:Z

    .line 252
    iput-boolean v1, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mShiftFreeze:Z

    .line 59
    return-void
.end method

.method private findKeys()V
    .locals 5

    .prologue
    .line 163
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinKeyboardView;->getKeyboard()Landroid/inputmethodservice/Keyboard;

    move-result-object v3

    invoke-virtual {v3}, Landroid/inputmethodservice/Keyboard;->getKeys()Ljava/util/List;

    move-result-object v2

    .line 165
    .local v2, keys:Ljava/util/List;,"Ljava/util/List<Landroid/inputmethodservice/Keyboard$Key;>;"
    const/4 v1, 0x0

    .local v1, i:I
    :goto_0
    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v3

    if-ge v1, v3, :cond_1

    .line 166
    invoke-interface {v2, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Landroid/inputmethodservice/Keyboard$Key;

    iget-object v3, v3, Landroid/inputmethodservice/Keyboard$Key;->codes:[I

    const/4 v4, 0x0

    aget v0, v3, v4

    .line 167
    .local v0, code:I
    if-ltz v0, :cond_0

    const/16 v3, 0xff

    if-gt v0, v3, :cond_0

    .line 168
    iget-object v4, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mAsciiKeys:[Landroid/inputmethodservice/Keyboard$Key;

    invoke-interface {v2, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Landroid/inputmethodservice/Keyboard$Key;

    aput-object v3, v4, v0

    .line 165
    :cond_0
    add-int/lit8 v1, v1, 0x1

    goto :goto_0

    .line 171
    .end local v0           #code:I
    :cond_1
    return-void
.end method


# virtual methods
.method checkShiftForTouchDown(Landroid/view/MotionEvent;I)V
    .locals 1
    .parameter "me"
    .parameter "id"

    .prologue
    .line 199
    invoke-virtual {p0, p1}, Lcom/android/inputmethod/latin/LatinKeyboardView;->isOnShiftKey(Landroid/view/MotionEvent;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 200
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinKeyboardView;->onShiftTouchDown()V

    .line 201
    iput p2, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mShiftPid:I

    .line 203
    :cond_0
    return-void
.end method

.method checkShiftForTouchUp(Landroid/view/MotionEvent;IZ)V
    .locals 1
    .parameter "me"
    .parameter "id"
    .parameter "forceUp"

    .prologue
    .line 206
    iget v0, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mShiftPid:I

    if-eq v0, p2, :cond_0

    if-eqz p3, :cond_1

    .line 207
    :cond_0
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinKeyboardView;->onShiftTouchUp()V

    .line 208
    const/4 v0, -0x1

    iput v0, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mShiftPid:I

    .line 210
    :cond_1
    return-void
.end method

.method public draw(Landroid/graphics/Canvas;)V
    .locals 0
    .parameter "c"

    .prologue
    .line 185
    invoke-super {p0, p1}, Lcom/android/inputmethod/latin/KeyboardView;->draw(Landroid/graphics/Canvas;)V

    .line 195
    return-void
.end method

.method public enableMultiTouch(Z)V
    .locals 0
    .parameter "enable"

    .prologue
    .line 216
    iput-boolean p1, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mEnableMultiTouch:Z

    .line 217
    return-void
.end method

.method public hasShiftKey()V
    .locals 1

    .prologue
    .line 220
    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mHasShiftKey:Z

    .line 221
    return-void
.end method

.method public isMTouchUpNeededForKey(Landroid/view/MotionEvent;)Z
    .locals 9
    .parameter "me"

    .prologue
    const/4 v8, 0x1

    const/4 v7, -0x1

    const/4 v6, 0x0

    .line 281
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F

    move-result v4

    float-to-int v2, v4

    .line 282
    .local v2, x:I
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F

    move-result v4

    float-to-int v3, v4

    .line 284
    .local v3, y:I
    const/4 v4, 0x0

    invoke-virtual {p0, v2, v3, v4}, Lcom/android/inputmethod/latin/LatinKeyboardView;->getKeyIndices(II[I)I

    move-result v1

    .line 286
    .local v1, ki:I
    if-eq v7, v1, :cond_0

    iget-object v4, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mKeys:[Landroid/inputmethodservice/Keyboard$Key;

    array-length v4, v4

    if-lt v1, v4, :cond_1

    :cond_0
    move v4, v6

    .line 315
    :goto_0
    return v4

    .line 290
    :cond_1
    iget-object v4, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mKeys:[Landroid/inputmethodservice/Keyboard$Key;

    aget-object v0, v4, v1

    .line 295
    .local v0, key:Landroid/inputmethodservice/Keyboard$Key;
    iget-object v4, v0, Landroid/inputmethodservice/Keyboard$Key;->codes:[I

    aget v4, v4, v6

    const/4 v5, -0x5

    if-eq v4, v5, :cond_2

    iget-object v4, v0, Landroid/inputmethodservice/Keyboard$Key;->codes:[I

    aget v4, v4, v6

    const/16 v5, 0xa

    if-eq v4, v5, :cond_2

    iget-object v4, v0, Landroid/inputmethodservice/Keyboard$Key;->codes:[I

    aget v4, v4, v6

    const/16 v5, 0x20

    if-ne v4, v5, :cond_3

    :cond_2
    move v4, v8

    .line 297
    goto :goto_0

    .line 303
    :cond_3
    iget-object v4, v0, Landroid/inputmethodservice/Keyboard$Key;->codes:[I

    aget v4, v4, v6

    if-ne v4, v7, :cond_4

    move v4, v6

    .line 304
    goto :goto_0

    .line 310
    :cond_4
    iget-object v4, v0, Landroid/inputmethodservice/Keyboard$Key;->label:Ljava/lang/CharSequence;

    if-eqz v4, :cond_5

    move v4, v8

    .line 311
    goto :goto_0

    :cond_5
    move v4, v6

    .line 315
    goto :goto_0
.end method

.method public isOnShiftKey(Landroid/view/MotionEvent;)Z
    .locals 9
    .parameter "me"

    .prologue
    const/4 v8, -0x1

    .line 228
    const/4 v2, 0x0

    .line 230
    .local v2, ret:Z
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F

    move-result v6

    float-to-int v4, v6

    .line 231
    .local v4, x:I
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F

    move-result v6

    float-to-int v5, v6

    .line 233
    .local v5, y:I
    const/4 v6, 0x0

    invoke-virtual {p0, v4, v5, v6}, Lcom/android/inputmethod/latin/LatinKeyboardView;->getKeyIndices(II[I)I

    move-result v1

    .line 235
    .local v1, ki:I
    if-eq v8, v1, :cond_0

    iget-object v6, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mKeys:[Landroid/inputmethodservice/Keyboard$Key;

    array-length v6, v6

    if-lt v1, v6, :cond_1

    :cond_0
    move v3, v2

    .line 249
    .end local v2           #ret:Z
    .local v3, ret:I
    :goto_0
    return v3

    .line 239
    .end local v3           #ret:I
    .restart local v2       #ret:Z
    :cond_1
    iget-object v6, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mKeys:[Landroid/inputmethodservice/Keyboard$Key;

    aget-object v0, v6, v1

    .line 244
    .local v0, key:Landroid/inputmethodservice/Keyboard$Key;
    iget-object v6, v0, Landroid/inputmethodservice/Keyboard$Key;->codes:[I

    const/4 v7, 0x0

    aget v6, v6, v7

    if-ne v6, v8, :cond_2

    .line 245
    iget-boolean v6, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mHasShiftKey:Z

    if-eqz v6, :cond_2

    .line 246
    const/4 v2, 0x1

    :cond_2
    move v3, v2

    .line 249
    .restart local v3       #ret:I
    goto :goto_0
.end method

.method public isTempShift()Z
    .locals 1

    .prologue
    .line 271
    iget-boolean v0, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->isTempShift:Z

    return v0
.end method

.method obtain(Landroid/view/MotionEvent;II)Landroid/view/MotionEvent;
    .locals 9
    .parameter "me"
    .parameter "action"
    .parameter "pidx"

    .prologue
    .line 331
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getDownTime()J

    move-result-wide v0

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getEventTime()J

    move-result-wide v2

    invoke-virtual {p1, p3}, Landroid/view/MotionEvent;->getX(I)F

    move-result v5

    invoke-virtual {p1, p3}, Landroid/view/MotionEvent;->getY(I)F

    move-result v6

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getMetaState()I

    move-result v7

    move v4, p2

    invoke-static/range {v0 .. v7}, Landroid/view/MotionEvent;->obtain(JJIFFI)Landroid/view/MotionEvent;

    move-result-object v8

    .line 335
    .local v8, ev:Landroid/view/MotionEvent;
    return-object v8
.end method

.method protected onLongPress(Landroid/inputmethodservice/Keyboard$Key;)Z
    .locals 5
    .parameter "key"

    .prologue
    const/4 v4, 0x0

    const/4 v3, 0x1

    const/4 v2, 0x0

    .line 67
    iget-object v0, p1, Landroid/inputmethodservice/Keyboard$Key;->codes:[I

    aget v0, v0, v2

    const/4 v1, -0x2

    if-ne v0, v1, :cond_0

    .line 68
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinKeyboardView;->getOnKeyboardActionListener()Lcom/android/inputmethod/latin/KeyboardView$OnKeyboardActionListener;

    move-result-object v0

    const/16 v1, -0x64

    invoke-interface {v0, v1, v4}, Lcom/android/inputmethod/latin/KeyboardView$OnKeyboardActionListener;->onKey(I[I)V

    move v0, v3

    .line 75
    :goto_0
    return v0

    .line 70
    :cond_0
    iget-object v0, p1, Landroid/inputmethodservice/Keyboard$Key;->codes:[I

    aget v0, v0, v2

    const/16 v1, 0x30

    if-ne v0, v1, :cond_1

    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinKeyboardView;->getKeyboard()Landroid/inputmethodservice/Keyboard;

    move-result-object v0

    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mPhoneKeyboard:Landroid/inputmethodservice/Keyboard;

    if-ne v0, v1, :cond_1

    .line 72
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinKeyboardView;->getOnKeyboardActionListener()Lcom/android/inputmethod/latin/KeyboardView$OnKeyboardActionListener;

    move-result-object v0

    const/16 v1, 0x2b

    invoke-interface {v0, v1, v4}, Lcom/android/inputmethod/latin/KeyboardView$OnKeyboardActionListener;->onKey(I[I)V

    move v0, v3

    .line 73
    goto :goto_0

    .line 75
    :cond_1
    invoke-super {p0, p1}, Lcom/android/inputmethod/latin/KeyboardView;->onLongPress(Landroid/inputmethodservice/Keyboard$Key;)Z

    move-result v0

    goto :goto_0
.end method

.method public onShiftTouchDown()V
    .locals 1

    .prologue
    .line 257
    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mShiftFreeze:Z

    .line 258
    return-void
.end method

.method public onShiftTouchUp()V
    .locals 1

    .prologue
    .line 265
    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mShiftFreeze:Z

    .line 266
    return-void
.end method

.method public onTouchEvent(Landroid/view/MotionEvent;)Z
    .locals 11
    .parameter "me"

    .prologue
    .line 340
    const/4 v8, 0x0

    .line 341
    .local v8, ret:Z
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I

    move-result v9

    and-int/lit16 v7, v9, 0xff

    .line 343
    .local v7, realAction:I
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I

    move-result v9

    const v10, 0xff00

    and-int/2addr v9, v10

    shr-int/lit8 v6, v9, 0x8

    .line 344
    .local v6, pIdx:I
    invoke-virtual {p1, v6}, Landroid/view/MotionEvent;->getPointerId(I)I

    move-result v5

    .line 355
    .local v5, pId:I
    iget-boolean v9, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mEnableMultiTouch:Z

    if-nez v9, :cond_0

    .line 356
    invoke-super {p0, p1}, Lcom/android/inputmethod/latin/KeyboardView;->onTouchEvent(Landroid/view/MotionEvent;)Z

    move-result v9

    .line 492
    :goto_0
    return v9

    .line 359
    :cond_0
    packed-switch v7, :pswitch_data_0

    :cond_1
    :goto_1
    move v9, v8

    .line 492
    goto :goto_0

    .line 362
    :pswitch_0
    iput v5, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mDownPid:I

    .line 363
    const/4 v9, 0x0

    invoke-super {p0, v9}, Lcom/android/inputmethod/latin/KeyboardView;->setPossiblePoly(Z)V

    .line 364
    invoke-super {p0, p1}, Lcom/android/inputmethod/latin/KeyboardView;->onTouchEvent(Landroid/view/MotionEvent;)Z

    move-result v8

    .line 365
    invoke-virtual {p0, p1, v5}, Lcom/android/inputmethod/latin/LatinKeyboardView;->checkShiftForTouchDown(Landroid/view/MotionEvent;I)V

    goto :goto_1

    .line 371
    :pswitch_1
    const/4 v9, 0x1

    invoke-super {p0, v9}, Lcom/android/inputmethod/latin/KeyboardView;->setPossiblePoly(Z)V

    .line 372
    iget-boolean v9, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mShiftFreeze:Z

    if-eqz v9, :cond_4

    .line 373
    const/4 v9, 0x1

    iput-boolean v9, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->isTempShift:Z

    .line 377
    :goto_2
    iget v9, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mDownPid:I

    if-ltz v9, :cond_2

    iget v9, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mDownPid:I

    iget v10, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mShiftPid:I

    if-eq v9, v10, :cond_2

    .line 381
    iget v9, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mDownPid:I

    invoke-virtual {p1, v9}, Landroid/view/MotionEvent;->findPointerIndex(I)I

    move-result v3

    .line 382
    .local v3, idx:I
    if-ltz v3, :cond_2

    .line 384
    const/4 v9, 0x1

    invoke-virtual {p0, p1, v9, v3}, Lcom/android/inputmethod/latin/LatinKeyboardView;->obtain(Landroid/view/MotionEvent;II)Landroid/view/MotionEvent;

    move-result-object v1

    .line 385
    .local v1, ev1:Landroid/view/MotionEvent;
    if-eqz v1, :cond_2

    .line 387
    invoke-virtual {p0, v1}, Lcom/android/inputmethod/latin/LatinKeyboardView;->isMTouchUpNeededForKey(Landroid/view/MotionEvent;)Z

    move-result v9

    if-eqz v9, :cond_5

    .line 388
    invoke-super {p0, v1}, Lcom/android/inputmethod/latin/KeyboardView;->onTouchEvent(Landroid/view/MotionEvent;)Z

    move-result v8

    .line 400
    .end local v1           #ev1:Landroid/view/MotionEvent;
    .end local v3           #idx:I
    :cond_2
    :goto_3
    if-ltz v6, :cond_3

    .line 402
    invoke-virtual {p1, v6}, Landroid/view/MotionEvent;->findPointerIndex(I)I

    move-result v4

    .line 403
    .local v4, indx:I
    const/4 v9, 0x0

    invoke-virtual {p0, p1, v9, v4}, Lcom/android/inputmethod/latin/LatinKeyboardView;->obtain(Landroid/view/MotionEvent;II)Landroid/view/MotionEvent;

    move-result-object v2

    .line 404
    .local v2, ev2:Landroid/view/MotionEvent;
    if-eqz v2, :cond_3

    .line 405
    invoke-super {p0, v2}, Lcom/android/inputmethod/latin/KeyboardView;->onTouchEvent(Landroid/view/MotionEvent;)Z

    move-result v8

    .line 406
    invoke-virtual {p0, v2, v5}, Lcom/android/inputmethod/latin/LatinKeyboardView;->checkShiftForTouchDown(Landroid/view/MotionEvent;I)V

    .line 407
    iget-boolean v9, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mShiftFreeze:Z

    if-eqz v9, :cond_3

    .line 408
    const/4 v9, 0x1

    iput-boolean v9, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->isTempShift:Z

    .line 413
    .end local v2           #ev2:Landroid/view/MotionEvent;
    .end local v4           #indx:I
    :cond_3
    iput v5, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mDownPid:I

    goto :goto_1

    .line 375
    :cond_4
    const/4 v9, 0x0

    iput-boolean v9, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->isTempShift:Z

    goto :goto_2

    .line 389
    .restart local v1       #ev1:Landroid/view/MotionEvent;
    .restart local v3       #idx:I
    :cond_5
    invoke-virtual {p0, v1}, Lcom/android/inputmethod/latin/LatinKeyboardView;->isOnShiftKey(Landroid/view/MotionEvent;)Z

    move-result v9

    if-eqz v9, :cond_6

    .line 391
    invoke-virtual {v1}, Landroid/view/MotionEvent;->recycle()V

    goto :goto_3

    .line 393
    :cond_6
    const/4 v9, 0x3

    invoke-virtual {v1, v9}, Landroid/view/MotionEvent;->setAction(I)V

    .line 394
    invoke-super {p0, v1}, Lcom/android/inputmethod/latin/KeyboardView;->onTouchEvent(Landroid/view/MotionEvent;)Z

    move-result v8

    goto :goto_3

    .line 418
    .end local v1           #ev1:Landroid/view/MotionEvent;
    .end local v3           #idx:I
    :pswitch_2
    iget v9, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mDownPid:I

    if-ltz v9, :cond_7

    .line 419
    iget v9, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mDownPid:I

    invoke-virtual {p1, v9}, Landroid/view/MotionEvent;->findPointerIndex(I)I

    move-result v3

    .line 420
    .restart local v3       #idx:I
    if-ltz v3, :cond_1

    .line 422
    const/4 v9, 0x2

    invoke-virtual {p0, p1, v9, v3}, Lcom/android/inputmethod/latin/LatinKeyboardView;->obtain(Landroid/view/MotionEvent;II)Landroid/view/MotionEvent;

    move-result-object v0

    .line 423
    .local v0, ev:Landroid/view/MotionEvent;
    if-eqz v0, :cond_1

    .line 424
    invoke-super {p0, v0}, Lcom/android/inputmethod/latin/KeyboardView;->onTouchEvent(Landroid/view/MotionEvent;)Z

    move-result v8

    goto/16 :goto_1

    .line 428
    .end local v0           #ev:Landroid/view/MotionEvent;
    .end local v3           #idx:I
    :cond_7
    iget v9, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mDownPid:I

    if-eq v5, v9, :cond_1

    iget v9, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mShiftPid:I

    if-ne v5, v9, :cond_1

    if-ltz v5, :cond_1

    .line 429
    invoke-virtual {p1, v5}, Landroid/view/MotionEvent;->findPointerIndex(I)I

    move-result v3

    .line 430
    .restart local v3       #idx:I
    if-ltz v3, :cond_1

    .line 431
    const/4 v9, 0x2

    invoke-virtual {p0, p1, v9, v3}, Lcom/android/inputmethod/latin/LatinKeyboardView;->obtain(Landroid/view/MotionEvent;II)Landroid/view/MotionEvent;

    move-result-object v0

    .line 432
    .restart local v0       #ev:Landroid/view/MotionEvent;
    if-eqz v0, :cond_1

    .line 433
    invoke-super {p0, v0}, Lcom/android/inputmethod/latin/KeyboardView;->onTouchEvent(Landroid/view/MotionEvent;)Z

    move-result v8

    goto/16 :goto_1

    .line 448
    .end local v0           #ev:Landroid/view/MotionEvent;
    .end local v3           #idx:I
    :pswitch_3
    iget v9, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mDownPid:I

    if-ltz v9, :cond_9

    iget v9, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mDownPid:I

    if-ne v5, v9, :cond_9

    .line 450
    iget v9, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mDownPid:I

    invoke-virtual {p1, v9}, Landroid/view/MotionEvent;->findPointerIndex(I)I

    move-result v3

    .line 451
    .restart local v3       #idx:I
    if-ltz v3, :cond_9

    .line 453
    const/4 v9, 0x1

    invoke-virtual {p0, p1, v9, v3}, Lcom/android/inputmethod/latin/LatinKeyboardView;->obtain(Landroid/view/MotionEvent;II)Landroid/view/MotionEvent;

    move-result-object v0

    .line 454
    .restart local v0       #ev:Landroid/view/MotionEvent;
    if-eqz v0, :cond_8

    .line 456
    iget v9, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mDownPid:I

    iget v10, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mShiftPid:I

    if-ne v9, v10, :cond_a

    .line 457
    iget v9, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mDownPid:I

    const/4 v10, 0x1

    invoke-virtual {p0, v0, v9, v10}, Lcom/android/inputmethod/latin/LatinKeyboardView;->checkShiftForTouchUp(Landroid/view/MotionEvent;IZ)V

    .line 458
    invoke-super {p0, v0}, Lcom/android/inputmethod/latin/KeyboardView;->onTouchEvent(Landroid/view/MotionEvent;)Z

    move-result v8

    .line 459
    const/4 v9, 0x0

    iput-boolean v9, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->isTempShift:Z

    .line 465
    :cond_8
    :goto_4
    const/4 v9, -0x1

    iput v9, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mDownPid:I

    .line 470
    .end local v0           #ev:Landroid/view/MotionEvent;
    .end local v3           #idx:I
    :cond_9
    iget v9, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mDownPid:I

    if-eq v5, v9, :cond_1

    iget v9, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mShiftPid:I

    if-ne v5, v9, :cond_1

    if-ltz v5, :cond_1

    .line 471
    invoke-virtual {p1, v5}, Landroid/view/MotionEvent;->findPointerIndex(I)I

    move-result v3

    .line 472
    .restart local v3       #idx:I
    if-ltz v3, :cond_1

    .line 473
    const/4 v9, 0x1

    invoke-virtual {p0, p1, v9, v3}, Lcom/android/inputmethod/latin/LatinKeyboardView;->obtain(Landroid/view/MotionEvent;II)Landroid/view/MotionEvent;

    move-result-object v0

    .line 474
    .restart local v0       #ev:Landroid/view/MotionEvent;
    if-eqz v0, :cond_1

    .line 476
    const/4 v9, 0x1

    invoke-virtual {p0, v0, v5, v9}, Lcom/android/inputmethod/latin/LatinKeyboardView;->checkShiftForTouchUp(Landroid/view/MotionEvent;IZ)V

    .line 477
    invoke-super {p0, v0}, Lcom/android/inputmethod/latin/KeyboardView;->onTouchEvent(Landroid/view/MotionEvent;)Z

    move-result v8

    .line 478
    const/4 v9, 0x0

    iput-boolean v9, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->isTempShift:Z

    goto/16 :goto_1

    .line 461
    :cond_a
    invoke-super {p0, v0}, Lcom/android/inputmethod/latin/KeyboardView;->onTouchEvent(Landroid/view/MotionEvent;)Z

    move-result v8

    goto :goto_4

    .line 487
    .end local v0           #ev:Landroid/view/MotionEvent;
    .end local v3           #idx:I
    :pswitch_4
    const/4 v9, -0x1

    iput v9, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mDownPid:I

    .line 488
    invoke-super {p0, p1}, Lcom/android/inputmethod/latin/KeyboardView;->onTouchEvent(Landroid/view/MotionEvent;)Z

    move-result v8

    goto/16 :goto_1

    .line 359
    nop

    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_3
        :pswitch_2
        :pswitch_4
        :pswitch_4
        :pswitch_1
        :pswitch_3
    .end packed-switch
.end method

.method public setKeyboard(Landroid/inputmethodservice/Keyboard;)V
    .locals 1
    .parameter "k"

    .prologue
    .line 99
    invoke-super {p0, p1}, Lcom/android/inputmethod/latin/KeyboardView;->setKeyboard(Landroid/inputmethodservice/Keyboard;)V

    .line 101
    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mHasShiftKey:Z

    .line 160
    return-void
.end method

.method public setPhoneKeyboard(Landroid/inputmethodservice/Keyboard;)V
    .locals 0
    .parameter "phoneKeyboard"

    .prologue
    .line 62
    iput-object p1, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mPhoneKeyboard:Landroid/inputmethodservice/Keyboard;

    .line 63
    return-void
.end method

.method public setShifted(Z)Z
    .locals 2
    .parameter "shifted"

    .prologue
    .line 319
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinKeyboardView;->isShifted()Z

    move-result v0

    .line 320
    .local v0, shiftFlag:Z
    iget-boolean v1, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mShiftFreeze:Z

    if-eqz v1, :cond_0

    .line 321
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinKeyboardView;->isShifted()Z

    move-result v0

    .line 326
    :goto_0
    return v0

    .line 323
    :cond_0
    invoke-super {p0, p1}, Lcom/android/inputmethod/latin/KeyboardView;->setShifted(Z)Z

    move-result v0

    goto :goto_0
.end method

.method startPlaying(Ljava/lang/String;)V
    .locals 0
    .parameter "s"

    .prologue
    .line 174
    return-void
.end method
